查询 Batch Transfer 对象

你可以使用 batch_transfer_id 来查询对应的 batch transfer 对象信息。

请求参数描述
BATCH_TRANSFER_ID REQUIRED string批量企业付款对象 id,由 Ping++ 生成,该参数仅需要填写在请求地址内。

返回

返回一个 batch transfer 对象或者一个错误,详见 错误

定义

GET https://api.pingxx.com/v1/batch_transfers/{BATCH_TRANSFER_ID}
$batch_tr = \Pingpp\BatchTransfer::retrieve($id);
public void retrieve(String id);
此语言 SDK 暂不支持该接口。
pingpp.batchTransfers.retrieve();
此语言 SDK 暂不支持该接口。
func ExampleBatchTransfer_get();
BatchTransfer.Retrieve(batchTranster.Id);

请求示例

curl https://api.pingxx.com/v1/batch_transfers/181610101014367590 \
-H "Pingplusplus-Signature: SIGNATURE" \
-H "Pingplusplus-Request-Timestamp: 1476067095" \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
try {
    $batch_tr = \Pingpp\BatchTransfer::retrieve('181611151506412852');        //批量转账对象id,由 Ping++ 生成
    echo $batch_tr;                                                         // 输出 Ping++ 返回的 batch transfer 对象列表
} catch (\Pingpp\Error\Base $e) {
    if ($e->getHttpStatus() != null) {
        header('Status: ' . $e->getHttpStatus());
        echo $e->getHttpBody();
    } else {
        echo $e->getMessage();
    }
}
public void retrieve(String id) {
    try {
        BatchTransfer obj = BatchTransfer.retrieve(id);
        System.out.println(obj);
    } catch (AuthenticationException e) {
        e.printStackTrace();
    } catch (InvalidRequestException e) {
        e.printStackTrace();
    } catch (APIConnectionException e) {
        e.printStackTrace();
    } catch (APIException e) {
        e.printStackTrace();
    } catch (ChannelException e) {
        e.printStackTrace();
    } catch (RateLimitException e) {
        e.printStackTrace();
    }
}
此语言 SDK 暂不支持该接口。
pingpp.batchTransfers.retrieve(
  // 通过 Batch Transfer 对象的 id 查询一个已创建的 Batch Transfer 对象
  "181610181347533047",
  function(err, transfer) {
    if (err != null) {
      console.log("pingpp.batchTransfers.retrieve fail:", err);
    }
    // YOUR CODE
  }
);
此语言 SDK 暂不支持该接口。
func ExampleBatchTransfer_get() {
  batchTransfer, err := batchTransfer.Get("181611151632109226")
  if err != nil {
    log.Fatal(err)
    return
  }
  content, _ := json.Marshal(batchTransfer)
  fmt.Println(string(content))
}
BatchTransfer.Retrieve(batchTranster.Id);

返回示例

{
    "id": "1818282929292221323",
    "object": "batch_transfer",
    "app": "app_ribgW1n2SOqcPxn1",
    "amount": 8000,
    "batch_no": "1231231231",
    "channel": "alipay",
    "currency": "cny",
    "created": 1111111,
    "description": "付款说明",
    "extra": {},
    "failure_msg": null,
    "fee": 100,
    "livemode": true,
    "metadata": {},
    "recipients": [
        {
            "account": "account01@alipay.com",
            "amount": 5000,
            "name": "张三",
            "transfer": "tr_jHWfvDnTKG0SiPmbfPbHW1eH",
            "status": "pending"
        },
        {
            "account": "account02@alipay.com",
            "amount": 3000,
            "name": "李四",
            "transfer": "tr_8u1yPK1eHWv9D08OePzDe1CK",
            "status": "pending"
        }
    ],
    "status": "pending",
    "time_succeeded": 123123123,
    "type": "b2c"
}